package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.fd.fddeviceplangrouptuo.FdDevicePlanGroupTuoQuery;
import com.uzai.console.entity.FdDevicePlanGroupTuo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface FdDevicePlanGroupTuoMapper {

    int deleteById(Long id);

    int deleteByByFdDevicePlanId(@Param("fdDevicePlanId") Long fdDevicePlanId, @Param("merId") Long merId);

    int insert(FdDevicePlanGroupTuo record);

    int insertSelective(FdDevicePlanGroupTuo record);

    FdDevicePlanGroupTuo selectById(Long id);

    int updateByIdSelective(FdDevicePlanGroupTuo record);

    int updateById(FdDevicePlanGroupTuo record);

    /**根据配置方案关联的群信息主键id查询所有的配置方案
     *
     * @param fdDevicePlanGroupId
     * @return
     */
    ArrayList<FdDevicePlanGroupTuo> findByListByFdDevicePlanGroupId(@Param("fdDevicePlanGroupId") Long fdDevicePlanGroupId, @Param("merId") Long merId);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<FdDevicePlanGroupTuo> findByList(Page<FdDevicePlanGroupTuo> page, @Param("query") FdDevicePlanGroupTuoQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<FdDevicePlanGroupTuo> findByList(@Param("query") FdDevicePlanGroupTuoQuery query);
}